package com.pyramid.api;

import org.json.JSONException;
import org.json.JSONObject;

public class LoginApi {
	private AppApi api = AppApi.getInstance();

	public LoginApi() {

	}

	public boolean login(String name, String password) {
		JSONObject object = null;
		
		try {
			String str = api.doGet("?action=login&login=" + null + "&pass="
					+ null + "&out=json");
			object = new JSONObject(str);
			if(object.getString("status").equals("success")){
				return true;
			}
		} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		return false;
	}
}
